﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OMailLineReport.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MacModel.OMailLineReport" %>

<form id="pagerForm" method="post" action="MacModel/OMailLineReport.aspx">

<input type="hidden" name="CreateDateFrom" value="<%=CreateDateFrom %>" />
<input type="hidden" name="CreateDateTo" value="<%=CreateDateTo %>" />
<input type="hidden" name="ReportType" value="<%=ReportType %>" />
<input type="hidden" name="ShowTimeInput" value="<%=ShowTimeInput?false:ShowTimeInput %>" />
</form>
<form id="form1" runat="server" method="post" action="MacModel/OMailLineReport.aspx" onsubmit="return navTabSearch(this);">

<div class="pageHeader">
    <div class="searchBar">
        <table class="searchContent">
             <tr>
                <td>
                    <input type="hidden" name="ShowTimeInput" value="<%=ShowTimeInput?false:ShowTimeInput %>" />
                    抽检日期： 
                </td>
                <td>
                    从:<input name="CreateDateFrom" type="text" class="date" value="<%=CreateDateFrom %>"  />
                    到:<input name="CreateDateTo" type="text" class="date" value="<%=CreateDateTo %>"  />
                </td>
                <td>选择要查看的报表类型:</td>
                <td>
                     <select name="ReportType">
                        <option value="1" <%=ReportType==1?"selected":"" %>>1.按工位统计NG量报表</option>
                        <option value="2" <%=ReportType==2?"selected":"" %>>2.按检查内容统计NG量报表</option>
                     </select>
                </td>
                <td>
                    <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
       
    </div>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">        
             <% if (HasPower(IHISCETeim.Web.Permission.导出))
                {%>
            <li>
                <li><a class="icon" href="MacModel/ExportOMailLineReport.aspx?CreateDateFrom=<%=CreateDateFrom %>&CreateDateTo=<%=CreateDateTo %>&ReportType=<%=ReportType %>" target="_blank" title="确定要导出吗?"><span>导出</span></a></li>
            </li>
            <%} %>
        </ul>
    </div>


    <%if (ReportType == 1)
      { %>
    <asp:repeater id="rpMenu1" runat="server">
        <HeaderTemplate>
        <table class="list" width="100%" layouth="52">
        <thead>
            <tr  >                
                <th width="50">
                    工位
                </th>
                <th width="100">
                    工位名称
                </th>
                <th width="60">
                    NG量
                </th>
                <th>所占比例</th>                
            </tr>
        </thead>
        <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr target="sid_user">
				<td><%# Eval("GW")%></td>
				<td><%# Eval("GWName")%></td>
                <td><%# Eval("NGCount")%></td>
                <td><%# Convert.ToDecimal(Eval("NGCountPer")).ToString("f2")%>%</td>
			</tr>
        </ItemTemplate>
        <FooterTemplate>
            <tr>
                <td>&nbsp;</td>
                <td  style="text-align:right;">NG合计:</td>
                <td><%=Convert.ToDecimal(GetSUMDT1("NGCount")).ToString("f0")%></td>
                <td>&nbsp;</td>
            </tr>
            </tbody>
         </table>
        </FooterTemplate>
    </asp:repeater>
    <%} %>
    <%if (ReportType == 2)
      { %>
    <asp:repeater id="rpMenu2" runat="server">
        <HeaderTemplate>
        <table class="list" width="100%" layouth="52">
        <thead>
            <tr  >                
                <th width="50">
                    工位
                </th>
                <th width="100">
                    工位名称
                </th>
                <th width="300">
                    检查内容
                </th>
                <th width="60">
                    NG量
                </th>  
                <th>NG比例</th>              
            </tr>
        </thead>
        <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr target="sid_user" >
				<td><%# Eval("GW")%></td>
				<td><%# Eval("GWName")%></td>
                <td><%# Eval("ChceckInclude")%></td>
                <td><%# Eval("NGCount")%></td>
                <td><%# Convert.ToDecimal(Eval("NGCountPer")).ToString("f2")%>%</td>
			</tr>
        </ItemTemplate>
        <FooterTemplate>
            <tr>
                 <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td style="text-align:right;">NG合计:</td>
                <td><%=Convert.ToDecimal(GetSUMDT2("NGCount")).ToString("f0")%></td>
                <td>&nbsp;</td>
            </tr>
            </tbody>
         </table>
        </FooterTemplate>
    </asp:repeater>
    <%} %>
</div>
</form>
